<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var flag = true;
        //if,else语句结构和c语言一样
        if(flag){
            
        }
        else if(flag){

        }
        else{

        }

        //switch语句,用于简化多个if， else if的结构
        switch(num){
            case "":
                //...
                break;
            case "":
                //...
                break;
            default:
                //...
        }

    </script>
</body>
</html>